!{include file='common/iheader.htm'}
!{if $debug}
!{$debug}
!{/if}
<style>
	.form_item{position:relative;}
	.del_btn{position:absolute;top:5px;right:10px;}
	.form_item div.ke-statusbar{display:block;}
	#search_form{margin-top: 30px;}
</style>
<link rel="stylesheet" href="/template/js/editor/kindEditor/themes/default/default.css" />
<script src="/template/js/editor/kindEditor/kindeditor-min.js"></script>
<script src="/template/js/editor/kindEditor/lang/zh_cn.js"></script>
<form method="post" action="/manager.php?app=spider&act=wiki">
	<div class="form_item">
		<strong>词条名称：</strong>
		<input type="text" class="text_input" name="word" value="!{$smarty.request.word}">
	</div>
	<div class="form_item">
		<strong>词条分类：</strong>
		<div>
			!{html_options name="dict_cate" options=$cates}
		</div>
	</div>
!{foreach from=$indexs item=item key=name name=p}
	<div class="form_item">
		<strong>目录：</strong>
		<input type="text" class="text_input" name="p[!{$smarty.foreach.p.index}]" value="!{$name}">
		<textarea class="wysiwyg" style="width:100%;height:200px" name="content[!{$smarty.foreach.p.index}]">!{$item}</textarea>
		<input class="del_btn" type="button" value="删除" onclick="$(this).parent().remove()"/>
	</div>
!{/foreach}
	<div class="form_item form_btn_item">
		<input class="button" type="submit" name="保存词条"/>
	</div>
</form>
<form method="post" id="search_form">
	<div class="form_item">
		<strong>词条名称：</strong>
		<input type="text" class="text_input" name="word">
	</div>
	<div class="form_item form_btn_item">
		<input class="button" type="submit" name="抓取"/>
	</div>
</form>
<script>
	$(function(){
		/**
		$('.wysiwyg').each(function(){
			create_editor(this);
		});
		**/
	});
</script>
!{include file='common/ifooter.htm'}